<template>
  <div>
    <div class="head">
      <div class="pic"></div>
      <a  v-if=!$store.state.userInformation>
        <span @click="handleLogin">立即登录</span>
      </a>
      <a>
        <span v-if="$store.state.userInformation">熊二喜欢live加玫瑰</span>
      </a>
    </div>
    <div class="mine">
      <a @click="handleOrder">
        <p class="iconfont icon-dingdan2"></p>
        <p class="txt">全部订单</p>
      </a>
      <router-link to="/login">
        <p class="iconfont icon-shouye2"></p>
        <p class="txt">观演人</p>
      </router-link>
      <router-link to="/login">
        <p class="iconfont icon-shouhuodizhi3"></p>
        <p class="txt">收货地址</p>
      </router-link>
      <router-link to="/login">
        <p class="iconfont icon-shezhi3"></p>
        <p class="txt">账号与安全</p>
      </router-link>
      <a @click="handleAlert">
        <p class="iconfont icon-kefu"></p>
        <p class="txt">在线客服</p>
      </a>
    </div>·
    <RouterView />
  </div>
</template>
<script>
import { Dialog } from 'vant';

export default {
  methods: {
    handleAlert() {
      Dialog.alert({
        message:'人工客服请拨打:18888880988',
      }).then(() => {
        // on close
      });
    },
    handleLogin(){
      this.$router.push('/login')
    },
    handleOrder(){
      this.$router.push('/mine/order')
    }
  },
};
</script>
<style lang="scss" scoped>
.head {
  display: flex;
  align-content: center;
  padding-top: 30px;
  padding-left: 15px;
  .pic {
    width: 56px;
    height: 56px;
    background: url("../assets/1.png");
    background-size: cover;
    display: inline-block;
  }
  span {
    font-size: 16px;
    line-height: 22px;
    font-weight: 700;
    margin-left: 17px;
    color: #111;
  }
}
.mine {
  height: 180px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  background: #f7f7f7;
  margin-top: 30px;
  padding-bottom: 2.8rem;
  border-radius: 27px;
  a,
  .green {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    width: 33%;
    text-align: center;
    margin-top: 1.8rem;
    .iconfont {
      color: black;
      font-size: 28px;
    }
    .txt {
      font-size: 11px;
    }
  }
}
</style>
